package fr.p10.miage.applianceTest;

import org.testng.AssertJUnit;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import fr.upo.miage.dp.state.appareil.ApplianceCommunicationException;
import fr.upo.miage.dp.state.appareil.state.ApplianceState;

public class TestApplianceONtoOFF extends TestRoot{
	@BeforeClass
	public static void setUp() throws ApplianceCommunicationException{
		TestApplianceOFFtoON.setUp();
		TestApplianceOFFtoON.testOffToOn();
	}
		
	@Test 
	public void testIsON(){
		current = toaster.getState(); 
		AssertJUnit.assertEquals(ApplianceState.ON, current);
	}
		
	@Test
	public static void testOnToOFF() throws ApplianceCommunicationException{
		toaster.turnOff();
		current = toaster.getState();
		AssertJUnit.assertEquals(ApplianceState.OFF, current);
	}
}

